home *** CD-ROM | disk | FTP | other *** search
-
-
-
- RRRRWWWWCCCCTTTTooookkkkeeeennnniiiizzzzeeeerrrr((((3333CCCC++++++++)))) RRRRWWWWCCCCTTTTooookkkkeeeennnniiiizzzzeeeerrrr((((3333CCCC++++++++))))
-
-
-
- NNNNaaaammmmeeee
- RWCTokenizer - Rogue Wave library class
-
- SSSSyyyynnnnooooppppssssiiiissss
- #include <rw/ctoken.h>
-
-
-
- RWCString str("a string of tokens");
- RWCTokenizer(str); // Lex the above string
-
-
-
-
- DDDDeeeessssccccrrrriiiippppttttiiiioooonnnn
- Class RRRRWWWWCCCCTTTTooookkkkeeeennnniiiizzzzeeeerrrr is designed to break a string up into separate tokens,
- delimited by an arbitrary "white space." It can be thought of as an
- iterator for strings and as an alternative to the ANSI C function
- ssssttttrrrrttttooookkkk(((()))) which has the unfortunate side effect of changing the string
- being tokenized.
-
- PPPPeeeerrrrssssiiiisssstttteeeennnncccceeee
- None
-
- EEEExxxxaaaammmmpppplllleeee
- #include <rw/ctoken.h>
- #include <rw/rstream.h>
- main(){
- RWCString a("Something is rotten in the state of Denmark");
- RWCTokenizer next(a); // Tokenize the string a
- RWCString token; // Will receive each token
- // Advance until the null string is returned:
- while (!(token=next()).isNull())
- cout << token << "0;
- }
-
-
- PPPPrrrrooooggggrrrraaaammmm oooouuuuttttppppuuuutttt::::
-
- Something
- is
- rotten
- in
- the
- state
- of
- Denmark
-
- PPPPuuuubbbblllliiiicccc CCCCoooonnnnssssttttrrrruuuuccccttttoooorrrr
- RRRRWWWWCCCCTTTTooookkkkeeeennnniiiizzzzeeeerrrr(const RWCString& s);
-
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- RRRRWWWWCCCCTTTTooookkkkeeeennnniiiizzzzeeeerrrr((((3333CCCC++++++++)))) RRRRWWWWCCCCTTTTooookkkkeeeennnniiiizzzzeeeerrrr((((3333CCCC++++++++))))
-
-
-
- Construct a tokenizer to lex the string ssss.
-
- PPPPuuuubbbblllliiiicccc MMMMeeeemmmmbbbbeeeerrrr OOOOppppeeeerrrraaaattttoooorrrrssss
- RWCSubString
- ooooppppeeeerrrraaaattttoooorrrr(((())));
-
-
- Advance to the next token and return it as a substring. The tokens are
- delimited by any of the four characters in """" 0000. (space, tab, newline and
- null).
-
- RWCSubString
- ooooppppeeeerrrraaaattttoooorrrr(((())))(const char* s);
-
-
- Advance to the next token and return it as a substring. The tokens are
- delimited by any character in ssss, or any embedded null.
-
- RWCSubString
- ooooppppeeeerrrraaaattttoooorrrr(((())))(const char* s,size_t num);
-
-
- Advance to the next token and return it as a substring. The tokens are
- delimited by any of the first nnnnuuuummmm characters in ssss. Buffer ssss may contain
- nulls, and must contain at least nnnnuuuummmm characters. Tokens will not be
- delimited by nulls unless ssss contains nulls.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-